import http from './../../../base/api/public'
import querystring from 'querystring'
let sysConfig = require('@/../config/sysConfig')
let apiUrl = sysConfig.xcApiUrlPre;
export const page_list = (page,size,params) =>{
  //?siteId=5f865ef8b043d8111ca497b2&pageAliase=王&templateId=5abf57965b05aa2ebcfce6d1
    let tempParam =  querystring.stringify(params);
    return http.requestQuickGet(apiUrl+"/cms/page/list/"+page+"/"+size+"?"+tempParam);
}
export const page_add = (params) =>{

 return http.requestPost(apiUrl+"/cms/page/add/",params);
}
export const page_get = (id) =>{
  return http.requestQuickGet(apiUrl+"/cms/page/get/"+id);
}

export const page_edit=(id,pageForm)=>{
  return http.requestPut(apiUrl+"/cms/page/edit/"+id,pageForm);
}
export const page_del = (id) =>{
  return http.requestDelete(apiUrl+"/cms/page/del/"+id);
}
// export const page_sitelist = () => {
//   return http.requestQuickGet(apiUrl+"/cms/page/cmsSite");
// }
// export const page_Templatelist = () => {
//   return http.requestQuickGet(apiUrl+"/cms/page/cmsTemplate");
// }
// export const page_add = (pageForm) =>{
//   //?siteId=5f865ef8b043d8111ca497b2&pageAliase=王&templateId=5abf57965b05aa2ebcfce6d1
//   //let tempParam =  querystring.p;
//   return http.requestPost(apiUrl+"/cms/page/add",pageForm);
//  // return http.requestQuickGet(apiUrl+"/cms/page/list/"+page+"/"+size+"?"+tempParam);
// }
// export const page_edit = (id,pageForm) =>{
//   return http.requestPut(apiUrl+"/cms/page/edit/"+id,pageForm);
// }
// export const page_get = (id) =>{
//   return http.requestQuickGet(apiUrl+"/cms/page/get/"+id);
// }
// export const page_del = (id) =>{
//   return http.requestDelete(apiUrl+"/cms/page/del/"+id);
// }
export const page_postPage =(id) =>{
  return http.requestPost(apiUrl+"/cms/page/postPage/"+id);
}




